//
//  YMShowViewController.m
//  bezierPath
//
//  Created by Andrew on 2018/7/25.
//  Copyright © 2018年 Andrew. All rights reserved.
//

#import "YMShowViewController.h"
#import "CircleView.h"
#import "QuadraticCurve.h"
#import "YMCubicCurve.h"
#import "YMBezierAnimation.h"
#import "YMHeartAnimation.h"

@interface YMShowViewController ()

@end

@implementation YMShowViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)setIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row == 0) {
        CircleView *cView = [[CircleView alloc] initWithFrame:CGRectMake(0, 64, SCREENWIDTH, SCREENHEIGHT - 64)];
        cView.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:cView];
    } else if (indexPath.row == 1) {
        QuadraticCurve *quadVC = [[QuadraticCurve alloc] initWithFrame:CGRectMake(0, 64, SCREENWIDTH, SCREENHEIGHT - 64)];
        quadVC.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:quadVC];
    } else if (indexPath.row == 2) {
        YMCubicCurve *cubicVC = [[YMCubicCurve alloc] initWithFrame:CGRectMake(0, 64, SCREENWIDTH, SCREENHEIGHT - 64)];
        cubicVC.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:cubicVC];
    } else if (indexPath.row == 3) {
        YMBezierAnimation *bezier = [[YMBezierAnimation alloc] initWithFrame:CGRectMake(0, 64, SCREENWIDTH, SCREENHEIGHT - 64)];
        bezier.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:bezier];
    } else if (indexPath.row == 4) {
        YMHeartAnimation *heart = [[YMHeartAnimation alloc] initWithFrame:CGRectMake(0, 64, SCREENWIDTH, SCREENHEIGHT - 64)];
        heart.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:heart];
        
    }
}

@end
